<template>
  <div class="app-container">
    <el-scrollbar style="height: 100%;">
      <el-row style="margin-top: 50px;">
        <el-col :span="8">
          <div class="echarts-item">
            <div class="echarts-title">
              {{ echartsData.chengben.title }}
            </div>
            <el-row :gutter="15" class="echarts-row" style="height: 430px;">
              <el-col :span="24">
                <line-bar :echartsData="echartsData.chengben"></line-bar>
              </el-col>
            </el-row>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="echarts-item">
            <div class="echarts-title">
              {{ echartsData.haodian.title }}
            </div>
            <el-row :gutter="15" class="echarts-row" style="height: 430px;">
              <el-col :span="24">
                <line-bar :echartsData="echartsData.haodian"></line-bar>
              </el-col>
            </el-row>
          </div>
        </el-col>
      </el-row>

    </el-scrollbar>
  </div>
</template>

<script>
  import LineBarPie from '@/components/echarts/LineBarPie'  //客服
  import LineBar from '@/components/echarts/LineBar'  //客服
  import Pie from '@/components/echarts/Pie'  //客服
  export default {
    mounted() {
      this.$store.commit('rdefaultActive', 'hdfx')
    },
    components: {
      LineBarPie,
      LineBar,
      Pie
    },
    data() {
      return {
        n: 2,
        echartsData: {
          chengben: {
            title: '单位成本报表',
            dataset: [
              ['product', '总计','电费','人工费','药费','设备折旧','其它'],
              ['辅助', 0,0,0.68,0.74,0.79,0.81],
              ['成本', 1.02,0.68,0.06,0.05,0.02,0.21],
            ],
            superposition:true,
            pieLength: 3,
            unitName: ['元/m³'],
            yAxis: [
              {
                name: '成本(km³)',
                formatter: '{value}'
              }
            ]
          },
          haodian: {
            title: '耗电分析报表',
            dataset: [
              ['product', '2018-04','2018-05','2018-06','2018-07','2018-08','2018-09','2018-10','2018-11','2018-12','2019-01','2019-02','2019-03','2019-04'],
              ['东郊水厂月耗电量', 722706.2,693623,605637.5,688471.2,687218.4,595212.4,606668.8,599150.5,496222.2,612890.8,559302,545188,693826.2],
              ['北郊水厂月耗电量', 61566,59079.8,45049,52279.2,71390.4,59080,49197.6,55528.8,64744.5,64058.4,55051.2,47193.3,63470.4],
              ['东郊水厂单位水量耗电量', 0.74,0.7,0.65,0.72,0.72,0.62,0.64,0.65,0.54,0.68,0.6,0.56,0.71],
              ['北郊水厂单位水量耗电量', 0.15,0.13,0.1,0.12,0.16,0.14,0.12,0.12,0.15,0.14,0.12,0.11,0.14],
            ],
            pieLength: 2,
            unitName: ['km³', '%'],
            yAxis: [
              {
                min: 0,
                max: 800000,
                name: '月耗电(kw)',
                formatter: '{value}'
              },
              {
                name: '单位水量耗电(kw/m³)',
                min: 0,
                max: 1,
                formatter: '{value}'
              }
            ]
          }
        }
      }
    },
    methods: {}
  }
</script>

<style scoped>

</style>
